import os
import django
from employee.models import Employee,Department

os.environ.setdefault('DJANGO_SETTINGS_MODULE',  'salary.settings')
django.setup()

emps = Employee.objects
emp = emps.filter(pk=10009).get()
title = list(emp.titles_set.all())
for t in title:
    print(t.title)
